* This script contains the code to select the best model according to BIC for the analysis in Table A8 of the on-line appendix in Ductor, L., Fafchamps, M., Goyal S. and M. van der Leij. Social Networks and Research Output. The Review of Economics and Statistics.

log using modelselection.log, replace
use prodndnp_qnt.dta, clear

/*OLS out-of-sample program*/
cap pro drop ols_os
program define ols_os
syntax varlist(numeric min=1) [if]
marksample touse
quietly reg `varlist' if `touse', vce(cluster auth)
qui scalar n1=e(N)
estat ic
scalar rmseols=e(rmse)
predict ybols if group==2, xb 
scalar r2i1ols= e(r2)   /*computing the R2 of the baseline model*/
qui gen sqerrols= (lprodf3-ybols)^2 if ybols<.
quietly egen peols=sum(sqerrols)if ybols<.  /*RSEE of the predicted model*/
quietly sum peols    /*summarizing the RSEE*/
quietly scalar rssols=r(max)  /*obtaining the total RSEE*/
quietly scalar nols=r(N)    /*number of observations in group 2*/
scalar rmseo2ols=(rssols/(nols-(e(df_m)+2)))^0.5   /*RMSE out of sample*/
di rmseols   "  Pooled OLS in-sample RMSE"
di n1 " Number of observations in the in-sample group"
di rmseo2ols "  Pooled OLS out-of-sample RMSE"
di nols " Number of observations in the out-of-sample group"
drop sqerrols peols ybols
end

/*Replacing missing by zeros*/

sort auth year
foreach i in 14 15 16 17 18 19 20 21 22 23 24 25 26 27{
gen lprodf3l`i'=L`i-1'.lprodf3l
replace lprodf3l`i'=0 if missing(lprodf3l`i')
}

/*Selecting the maximun lag length*/

order auth year t tsq lcprod5 lcprodl5 lprodf3 lprodf3l* prod prodf5 mt qnt cprod cprod5 cprodl5 mnauthors ystart yend nopapers group prodf3 degree1y degree2y degree3y degree4y degree5y degree6y degree7y degree8y degree9y degree10y degree11y degree12y degree13y degree14y degree15y degree21y degree22y degree23y degree24y degree25y degree26y degree27y degree28y degree29y degree210y degree211y degree212y degree213y degree214y degree215y gc1y gc2y gc3y gc4y gc5y gc6y gc7y gc8y gc9y gc10y gc11y gc12y gc13y gc14y gc15y lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y lnetprod6y lnetprod7y lnetprod8y lnetprod9y lnetprod10y lnetprod11y lnetprod12y lnetprod13y lnetprod14y lnetprod15y lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y lnetprod26y lnetprod27y lnetprod28y lnetprod29y lnetprod210y lnetprod211y lnetprod212y lnetprod213y lnetprod214y lnetprod215y lbet1y lbet2y lbet3y lbet4y lbet5y lbet6y lbet7y lbet8y lbet9y lbet10y lbet11y lbet12y lbet13y lbet14y lbet15y

ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l24 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l23 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l22 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l21 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l20 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l19 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l18 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l17 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l16 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l15 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l14 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l12 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l11 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l10 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l9 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l8 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l7 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l6 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l5 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l4 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l3 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l2 if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l if group==1


/*The best model in terms of BIC and RMSE out-of-sample contains 13 lags of productivity*/

/************************NEW MODELS 3: INCLUDE OUTPUT AND A NETWORK VARIABLE***********************/
/*Netprod*/

ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y lnetprod6y lnetprod7y lnetprod8y lnetprod9y lnetprod10y lnetprod11y lnetprod12y lnetprod13y lnetprod14y lnetprod15y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y lnetprod6y lnetprod7y lnetprod8y lnetprod9y lnetprod10y lnetprod11y lnetprod12y lnetprod13y lnetprod14y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y lnetprod6y lnetprod7y lnetprod8y lnetprod9y lnetprod10y lnetprod11y lnetprod12y lnetprod13y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y lnetprod6y lnetprod7y lnetprod8y lnetprod9y lnetprod10y lnetprod11y lnetprod12y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y lnetprod6y lnetprod7y lnetprod8y lnetprod9y lnetprod10y lnetprod11y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y lnetprod6y lnetprod7y lnetprod8y lnetprod9y lnetprod10y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y lnetprod6y lnetprod7y lnetprod8y lnetprod9y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y lnetprod6y lnetprod7y lnetprod8y if group==1 
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y lnetprod6y lnetprod7y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y lnetprod6y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y lnetprod2y lnetprod3y lnetprod4y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y lnetprod2y lnetprod3y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y lnetprod2y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y if group==1


/*Netprod2*/

ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y lnetprod26y lnetprod27y lnetprod28y lnetprod29y lnetprod210y lnetprod211y lnetprod212y lnetprod213y lnetprod214y lnetprod215y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y lnetprod26y lnetprod27y lnetprod28y lnetprod29y lnetprod210y lnetprod211y lnetprod212y lnetprod213y lnetprod214y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y lnetprod26y lnetprod27y lnetprod28y lnetprod29y lnetprod210y lnetprod211y lnetprod212y lnetprod213y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y lnetprod26y lnetprod27y lnetprod28y lnetprod29y lnetprod210y lnetprod211y lnetprod212y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y lnetprod26y lnetprod27y lnetprod28y lnetprod29y lnetprod210y lnetprod211y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y lnetprod26y lnetprod27y lnetprod28y lnetprod29y lnetprod210y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y lnetprod26y lnetprod27y lnetprod28y lnetprod29y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y lnetprod26y lnetprod27y lnetprod28y if group==1 
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y lnetprod26y lnetprod27y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y lnetprod26y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod21y lnetprod22y lnetprod23y lnetprod24y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod21y lnetprod22y lnetprod23y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod21y lnetprod22y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod21y if group==1

/*Degree*/

ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree1y degree2y degree3y degree4y degree5y degree6y degree7y degree8y degree9y degree10y degree11y degree12y degree13y degree14y degree15y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree1y degree2y degree3y degree4y degree5y degree6y degree7y degree8y degree9y degree10y degree11y degree12y degree13y degree14y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree1y degree2y degree3y degree4y degree5y degree6y degree7y degree8y degree9y degree10y degree11y degree12y degree13y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree1y degree2y degree3y degree4y degree5y degree6y degree7y degree8y degree9y degree10y degree11y degree12y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree1y degree2y degree3y degree4y degree5y degree6y degree7y degree8y degree9y degree10y degree11y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree1y degree2y degree3y degree4y degree5y degree6y degree7y degree8y degree9y degree10y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree1y degree2y degree3y degree4y degree5y degree6y degree7y degree8y degree9y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree1y degree2y degree3y degree4y degree5y degree6y degree7y degree8y if group==1 
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree1y degree2y degree3y degree4y degree5y degree6y degree7y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree1y degree2y degree3y degree4y degree5y degree6y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree1y degree2y degree3y degree4y degree5y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree1y degree2y degree3y degree4y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree1y degree2y degree3y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree1y degree2y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree1y if group==1

/*Degree 2*/


ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree21y degree22y degree23y degree24y degree25y degree26y degree27y degree28y degree29y degree210y degree211y degree212y degree213y degree214y degree215y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree21y degree22y degree23y degree24y degree25y degree26y degree27y degree28y degree29y degree210y degree211y degree212y degree213y degree214y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree21y degree22y degree23y degree24y degree25y degree26y degree27y degree28y degree29y degree210y degree211y degree212y degree213y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree21y degree22y degree23y degree24y degree25y degree26y degree27y degree28y degree29y degree210y degree211y degree212y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree21y degree22y degree23y degree24y degree25y degree26y degree27y degree28y degree29y degree210y degree211y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree21y degree22y degree23y degree24y degree25y degree26y degree27y degree28y degree29y degree210y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree21y degree22y degree23y degree24y degree25y degree26y degree27y degree28y degree29y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree21y degree22y degree23y degree24y degree25y degree26y degree27y degree28y if group==1 
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree21y degree22y degree23y degree24y degree25y degree26y degree27y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree21y degree22y degree23y degree24y degree25y degree26y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree21y degree22y degree23y degree24y degree25y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree21y degree22y degree23y degree24y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree21y degree22y degree23y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree21y degree22y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 degree21y if group==1

/*Giant Component*/
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc15y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc14y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc13y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc12y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc11y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc10y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc9y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc8y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc7y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc6y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc5y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc4y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc3y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y  if group==1

/*Betweenness*/
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc15y lbet1y-lbet15y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc14y lbet1y-lbet14y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc13y  lbet1y-lbet13y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc12y  lbet1y-lbet12y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc11y lbet1y-lbet11y   if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc10y lbet1y-lbet10y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc9y lbet1y-lbet9y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc8y lbet1y-lbet8y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc7y lbet1y-lbet7y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc6y lbet1y-lbet6y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc5y lbet1y-lbet5y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc4y lbet1y-lbet4y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc3y lbet1y-lbet3y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y lbet1y lbet2y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y lbet1y if group==1

/*closenness*/
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc15y lclos1y-lclos15y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc14y lclos1y-lclos14y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc13y  lclos1y-lclos13y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc12y  lclos1y-lclos12y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc11y lclos1y-lclos11y   if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc10y lclos1y-lclos10y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc9y lclos1y-lclos9y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc8y lclos1y-lclos8y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc7y lclos1y-lclos7y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc6y lclos1y-lclos6y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc5y lclos1y-lclos5y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc4y lclos1y-lclos4y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y-gc3y lclos1y-lclos3y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y gc2y lclos1y lclos2y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 gc1y lclos1y if group==1

/*neiq1*/

ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 neiq11y neiq12y neiq13y neiq14y neiq15y neiq16y neiq17y neiq18y neiq19y neiq110y neiq111y neiq112y neiq113y neiq114y neiq115y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 neiq11y neiq12y neiq13y neiq14y neiq15y neiq16y neiq17y neiq18y neiq19y neiq110y neiq111y neiq112y neiq113y neiq114y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 neiq11y neiq12y neiq13y neiq14y neiq15y neiq16y neiq17y neiq18y neiq19y neiq110y neiq111y neiq112y neiq113y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 neiq11y neiq12y neiq13y neiq14y neiq15y neiq16y neiq17y neiq18y neiq19y neiq110y neiq111y neiq112y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 neiq11y neiq12y neiq13y neiq14y neiq15y neiq16y neiq17y neiq18y neiq19y neiq110y neiq111y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 neiq11y neiq12y neiq13y neiq14y neiq15y neiq16y neiq17y neiq18y neiq19y neiq110y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 neiq11y neiq12y neiq13y neiq14y neiq15y neiq16y neiq17y neiq18y neiq19y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 neiq11y neiq12y neiq13y neiq14y neiq15y neiq16y neiq17y neiq18y if group==1 
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 neiq11y neiq12y neiq13y neiq14y neiq15y neiq16y neiq17y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 neiq11y neiq12y neiq13y neiq14y neiq15y neiq16y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 neiq11y neiq12y neiq13y neiq14y neiq15y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 neiq11y neiq12y neiq13y neiq14y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 neiq11y neiq12y neiq13y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 neiq11y neiq12y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 neiq11y if group==1

/************************NEW MODELS 2: BASELINE MODEL + A NETWORK VARIABLE***********************/
/*Netprod*/

ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y lnetprod6y lnetprod7y lnetprod8y lnetprod9y lnetprod10y lnetprod11y lnetprod12y lnetprod13y lnetprod14y lnetprod15y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y lnetprod6y lnetprod7y lnetprod8y lnetprod9y lnetprod10y lnetprod11y lnetprod12y lnetprod13y lnetprod14y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y lnetprod6y lnetprod7y lnetprod8y lnetprod9y lnetprod10y lnetprod11y lnetprod12y lnetprod13y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y lnetprod6y lnetprod7y lnetprod8y lnetprod9y lnetprod10y lnetprod11y lnetprod12y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y lnetprod6y lnetprod7y lnetprod8y lnetprod9y lnetprod10y lnetprod11y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y lnetprod6y lnetprod7y lnetprod8y lnetprod9y lnetprod10y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y lnetprod6y lnetprod7y lnetprod8y lnetprod9y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y lnetprod6y lnetprod7y lnetprod8y if group==1 
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y lnetprod6y lnetprod7y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y lnetprod6y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod1y lnetprod2y lnetprod3y lnetprod4y lnetprod5y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod1y lnetprod2y lnetprod3y lnetprod4y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod1y lnetprod2y lnetprod3y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod1y lnetprod2y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod1y if group==1
/*12y lowest BIC*/

/*Netprod2*/

ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y lnetprod26y lnetprod27y lnetprod28y lnetprod29y lnetprod210y lnetprod211y lnetprod212y lnetprod213y lnetprod214y lnetprod215y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y lnetprod26y lnetprod27y lnetprod28y lnetprod29y lnetprod210y lnetprod211y lnetprod212y lnetprod213y lnetprod214y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y lnetprod26y lnetprod27y lnetprod28y lnetprod29y lnetprod210y lnetprod211y lnetprod212y lnetprod213y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y lnetprod26y lnetprod27y lnetprod28y lnetprod29y lnetprod210y lnetprod211y lnetprod212y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y lnetprod26y lnetprod27y lnetprod28y lnetprod29y lnetprod210y lnetprod211y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y lnetprod26y lnetprod27y lnetprod28y lnetprod29y lnetprod210y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y lnetprod26y lnetprod27y lnetprod28y lnetprod29y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y lnetprod26y lnetprod27y lnetprod28y if group==1 
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y lnetprod26y lnetprod27y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y lnetprod26y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod21y lnetprod22y lnetprod23y lnetprod24y lnetprod25y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod21y lnetprod22y lnetprod23y lnetprod24y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod21y lnetprod22y lnetprod23y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod21y lnetprod22y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  lnetprod21y if group==1
/* 12y lowest BIC*/

/*Degree*/

ols_os lprodf3 y2-y27 nopapers t tsq  degree1y degree2y degree3y degree4y degree5y degree6y degree7y degree8y degree9y degree10y degree11y degree12y degree13y degree14y degree15y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree1y degree2y degree3y degree4y degree5y degree6y degree7y degree8y degree9y degree10y degree11y degree12y degree13y degree14y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree1y degree2y degree3y degree4y degree5y degree6y degree7y degree8y degree9y degree10y degree11y degree12y degree13y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree1y degree2y degree3y degree4y degree5y degree6y degree7y degree8y degree9y degree10y degree11y degree12y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree1y degree2y degree3y degree4y degree5y degree6y degree7y degree8y degree9y degree10y degree11y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree1y degree2y degree3y degree4y degree5y degree6y degree7y degree8y degree9y degree10y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree1y degree2y degree3y degree4y degree5y degree6y degree7y degree8y degree9y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree1y degree2y degree3y degree4y degree5y degree6y degree7y degree8y if group==1 
ols_os lprodf3 y2-y27 nopapers t tsq  degree1y degree2y degree3y degree4y degree5y degree6y degree7y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree1y degree2y degree3y degree4y degree5y degree6y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree1y degree2y degree3y degree4y degree5y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree1y degree2y degree3y degree4y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree1y degree2y degree3y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree1y degree2y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree1y if group==1
/* 12y lowest BIC*/


/*Degree 2*/


ols_os lprodf3 y2-y27 nopapers t tsq  degree21y degree22y degree23y degree24y degree25y degree26y degree27y degree28y degree29y degree210y degree211y degree212y degree213y degree214y degree215y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree21y degree22y degree23y degree24y degree25y degree26y degree27y degree28y degree29y degree210y degree211y degree212y degree213y degree214y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree21y degree22y degree23y degree24y degree25y degree26y degree27y degree28y degree29y degree210y degree211y degree212y degree213y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree21y degree22y degree23y degree24y degree25y degree26y degree27y degree28y degree29y degree210y degree211y degree212y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree21y degree22y degree23y degree24y degree25y degree26y degree27y degree28y degree29y degree210y degree211y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree21y degree22y degree23y degree24y degree25y degree26y degree27y degree28y degree29y degree210y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree21y degree22y degree23y degree24y degree25y degree26y degree27y degree28y degree29y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree21y degree22y degree23y degree24y degree25y degree26y degree27y degree28y if group==1 
ols_os lprodf3 y2-y27 nopapers t tsq  degree21y degree22y degree23y degree24y degree25y degree26y degree27y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree21y degree22y degree23y degree24y degree25y degree26y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree21y degree22y degree23y degree24y degree25y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree21y degree22y degree23y degree24y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree21y degree22y degree23y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree21y degree22y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  degree21y if group==1
/* 11y lowest BIC*/


/*Giant Component*/
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc15y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc14y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc13y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc12y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc11y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc10y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc9y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc8y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc7y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc6y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc5y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc4y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc3y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y  if group==1
/* 15y lowest BIC*/

/*Betweenness*/
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc15y lbet1y-lbet15y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc14y lbet1y-lbet14y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc13y  lbet1y-lbet13y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc12y  lbet1y-lbet12y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc11y lbet1y-lbet11y   if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc10y lbet1y-lbet10y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc9y lbet1y-lbet9y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc8y lbet1y-lbet8y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc7y lbet1y-lbet7y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc6y lbet1y-lbet6y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc5y lbet1y-lbet5y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc4y lbet1y-lbet4y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc3y lbet1y-lbet3y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y lbet1y lbet2y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y lbet1y if group==1
/* 15y lowest BIC*/

/*closenness*/
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc15y lclos1y-lclos15y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc14y lclos1y-lclos14y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc13y  lclos1y-lclos13y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc12y  lclos1y-lclos12y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc11y lclos1y-lclos11y   if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc10y lclos1y-lclos10y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc9y lclos1y-lclos9y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc8y lclos1y-lclos8y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc7y lclos1y-lclos7y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc6y lclos1y-lclos6y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc5y lclos1y-lclos5y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc4y lclos1y-lclos4y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y-gc3y lclos1y-lclos3y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y gc2y lclos1y lclos2y  if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  gc1y lclos1y if group==1
/* 15y lowest BIC*/

/*neiq1*/

ols_os lprodf3 y2-y27 nopapers t tsq  neiq11y neiq12y neiq13y neiq14y neiq15y neiq16y neiq17y neiq18y neiq19y neiq110y neiq111y neiq112y neiq113y neiq114y neiq115y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  neiq11y neiq12y neiq13y neiq14y neiq15y neiq16y neiq17y neiq18y neiq19y neiq110y neiq111y neiq112y neiq113y neiq114y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  neiq11y neiq12y neiq13y neiq14y neiq15y neiq16y neiq17y neiq18y neiq19y neiq110y neiq111y neiq112y neiq113y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  neiq11y neiq12y neiq13y neiq14y neiq15y neiq16y neiq17y neiq18y neiq19y neiq110y neiq111y neiq112y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  neiq11y neiq12y neiq13y neiq14y neiq15y neiq16y neiq17y neiq18y neiq19y neiq110y neiq111y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  neiq11y neiq12y neiq13y neiq14y neiq15y neiq16y neiq17y neiq18y neiq19y neiq110y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  neiq11y neiq12y neiq13y neiq14y neiq15y neiq16y neiq17y neiq18y neiq19y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  neiq11y neiq12y neiq13y neiq14y neiq15y neiq16y neiq17y neiq18y if group==1 
ols_os lprodf3 y2-y27 nopapers t tsq  neiq11y neiq12y neiq13y neiq14y neiq15y neiq16y neiq17y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  neiq11y neiq12y neiq13y neiq14y neiq15y neiq16y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  neiq11y neiq12y neiq13y neiq14y neiq15y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  neiq11y neiq12y neiq13y neiq14y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  neiq11y neiq12y neiq13y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  neiq11y neiq12y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq  neiq11y if group==1
/* 14y lowest BIC*/

/************************Multivariate Model 2: INCLUDE All THE RELEVANT NETWORK VARIABLES***********************/

/*Stepwise*/

ols_os lprodf3 y2-y27 nopapers t tsq lnetprod1y-lnetprod15y lnetprod21y-lnetprod215y degree1y-degree15y degree21y-degree215y gc1y-gc15y lbet1y-lbet15y lclos1y-lclos15y neiq11y-neiq115y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lnetprod1y-lnetprod14y lnetprod21y-lnetprod214y degree1y-degree14y degree21y-degree214y gc1y-gc14y lbet1y-lbet14y lclos1y-lclos14y neiq11y-neiq114y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lnetprod1y-lnetprod13y lnetprod21y-lnetprod213y degree1y-degree13y degree21y-degree213y gc1y-gc13y lbet1y-lbet13y lclos1y-lclos13y neiq11y-neiq113y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lnetprod1y-lnetprod12y lnetprod21y-lnetprod212y degree1y-degree12y degree21y-degree212y gc1y-gc12y lbet1y-lbet12y lclos1y-lclos12y neiq11y-neiq112y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lnetprod1y-lnetprod11y lnetprod21y-lnetprod211y degree1y-degree11y degree21y-degree211y gc1y-gc11y lbet1y-lbet11y lclos1y-lclos11y neiq11y-neiq111y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lnetprod1y-lnetprod10y lnetprod21y-lnetprod210y degree1y-degree10y degree21y-degree210y gc1y-gc10y lbet1y-lbet10y lclos1y-lclos10y neiq11y-neiq110y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lnetprod1y-lnetprod9y lnetprod21y-lnetprod29y degree1y-degree9y degree21y-degree29y gc1y-gc9y lbet1y-lbet9y lclos1y-lclos9y neiq11y-neiq19y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lnetprod1y-lnetprod8y lnetprod21y-lnetprod28y degree1y-degree8y degree21y-degree28y gc1y-gc8y lbet1y-lbet8y lclos1y-lclos8y neiq11y-neiq18y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lnetprod1y-lnetprod7y lnetprod21y-lnetprod27y degree1y-degree7y degree21y-degree27y gc1y-gc7y lbet1y-lbet7y lclos1y-lclos7y neiq11y-neiq17y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lnetprod1y-lnetprod6y lnetprod21y-lnetprod26y degree1y-degree6y degree21y-degree26y gc1y-gc6y lbet1y-lbet6y lclos1y-lclos6y neiq11y-neiq16y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lnetprod1y-lnetprod5y lnetprod21y-lnetprod25y degree1y-degree5y degree21y-degree25y gc1y-gc5y lbet1y-lbet5y lclos1y-lclos5y neiq11y-neiq15y if group==1


/*12lag, lowest BIC*/

/************************Multivariate Model 3: Past output+All THE RELEVANT NETWORK VARIABLES***********************/

/*Stepwise*/

ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y-lnetprod15y lnetprod21y-lnetprod215y degree1y-degree15y degree21y-degree215y gc1y-gc15y lbet1y-lbet15y lclos1y-lclos15y neiq11y-neiq115y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y-lnetprod14y lnetprod21y-lnetprod214y degree1y-degree14y degree21y-degree214y gc1y-gc14y lbet1y-lbet14y lclos1y-lclos14y neiq11y-neiq114y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y-lnetprod13y lnetprod21y-lnetprod213y degree1y-degree13y degree21y-degree213y gc1y-gc13y lbet1y-lbet13y lclos1y-lclos13y neiq11y-neiq113y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y-lnetprod12y lnetprod21y-lnetprod212y degree1y-degree12y degree21y-degree212y gc1y-gc12y lbet1y-lbet12y lclos1y-lclos12y neiq11y-neiq112y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y-lnetprod11y lnetprod21y-lnetprod211y degree1y-degree11y degree21y-degree211y gc1y-gc11y lbet1y-lbet11y lclos1y-lclos11y neiq11y-neiq111y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y-lnetprod10y lnetprod21y-lnetprod210y degree1y-degree10y degree21y-degree210y gc1y-gc10y lbet1y-lbet10y lclos1y-lclos10y neiq11y-neiq110y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y-lnetprod9y lnetprod21y-lnetprod29y degree1y-degree9y degree21y-degree29y gc1y-gc9y lbet1y-lbet9y lclos1y-lclos9y neiq11y-neiq19y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y-lnetprod8y lnetprod21y-lnetprod28y degree1y-degree8y degree21y-degree28y gc1y-gc8y lbet1y-lbet8y lclos1y-lclos8y neiq11y-neiq18y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y-lnetprod7y lnetprod21y-lnetprod27y degree1y-degree7y degree21y-degree27y gc1y-gc7y lbet1y-lbet7y lclos1y-lclos7y neiq11y-neiq17y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y-lnetprod6y lnetprod21y-lnetprod26y degree1y-degree6y degree21y-degree26y gc1y-gc6y lbet1y-lbet6y lclos1y-lclos6y neiq11y-neiq16y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y-lnetprod5y lnetprod21y-lnetprod25y degree1y-degree5y degree21y-degree25y gc1y-gc5y lbet1y-lbet5y lclos1y-lclos5y neiq11y-neiq15y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y-lnetprod4y lnetprod21y-lnetprod24y degree1y-degree4y degree21y-degree24y gc1y-gc4y lbet1y-lbet4y lclos1y-lclos4y neiq11y-neiq14y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y-lnetprod3y lnetprod21y-lnetprod23y degree1y-degree3y degree21y-degree23y gc1y-gc3y lbet1y-lbet3y lclos1y-lclos3y neiq11y-neiq13y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y-lnetprod2y lnetprod21y-lnetprod22y degree1y-degree2y degree21y-degree22y gc1y-gc2y lbet1y-lbet2y lclos1y-lclos2y neiq11y-neiq12y if group==1
ols_os lprodf3 y2-y27 nopapers t tsq lprodf3l-lprodf3l13 lnetprod1y-lnetprod1y lnetprod21y-lnetprod21y degree1y-degree1y degree21y-degree21y gc1y-gc1y lbet1y-lbet1y lclos1y-lclos1y neiq11y-neiq11y if group==1

/*6 lag, lowest BIC*/

log close
